<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">

    <link rel="stylesheet" href="css/weui.css">
    <link rel="stylesheet" href="css/jquery-weui.css">
    <link rel="stylesheet" href="css/style.css">
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.2&key=fc8d203edc94af7f4fe3a3f02fb99a74"></script>

<style type="text/css">

</style>
</head>
<body class="back1">

    <div class="index-top-fix">
        <div class="top" id="share_pop">
            <p style="text-align: center;color:#ccc;">公益顺风车</p>
        </div>
        <div class="bottom">
            <div class="tab-bottom">
                <a href="javascript:;" class="cur">乘客</a>
                <a href="首页-车主.html">车主</a>
                <div class="pao">月赚1500元</div>
            </div>
            <div style="position: absolute;right: 10px;top: 0;">
                <a href="tel:13137683557"><img src="images/kefu.png" width="20" style="margin-right:12px;"></a>
                <a href="个人资料.html"><img src="images/user1.png" width="15"></a>
            </div>
        </div>
        <!-- <div class="top">
            <p class="sfc col1">顺风车</p>
            <div class="address">
                <img src="images/sfcLOGO.png" class="sfc-img" width="27">
                <p>周口</p>
                <img src="images/xia.png" width="20" class="xia">
            </div>
            <div class="user">
                <img src="images/user1.png" width="15">
            </div>
        </div> -->
        <!-- <div class="bottom">
            <div class="tab-bottom">
                <a href="#" class="cur">乘客</a>
                <a href="#">车主</a>
                <div class="pao">月赚1500元</div>
            </div>
            <div class="kefu">客服</div>
        </div> -->
    </div>

    <!-- 这里写内容 -->
    <div style="margin-top: 88px;">    
    </div>

    <div class="weui-tab index-box index-kuashi">
        <div class="weui-navbar" id="navbarShi">
            <a class="weui-navbar__item weui-bar__item--on" href="#tab1" vid="0">
                市内
            </a>
            <a class="weui-navbar__item" href="#tab2" vid="1">
                跨城
            </a>
        </div>
        <div class="weui-tab__bd">
            <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
                <div class="weui-cells">
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <span class="dian"></span>
                        </div>
                        <div class="weui-cell__bd">
                            <p class="f15 open-popup" id="addressStart" style="cursor:pointer">你从哪儿出发</p>
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <span class="dian2"></span>
                        </div>
                        <div class="weui-cell__bd">
                            <p class="f15 col1 open-popup" id="addressEnd" style="cursor:pointer">你要去哪儿</p>
                        </div>
                    </div>
                </div>
            </div>
            <div id="tab2" class="weui-tab__bd-item">
                <div class="weui-cells">
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <span class="dian"></span>
                        </div>
                        <div class="weui-cell__bd">
                            <p class="f15" id="addressStartKua" style="cursor:pointer">你从哪儿出发</p>
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <span class="dian2"></span>
                        </div>
                        <div class="weui-cell__bd">
                            <p class="f15 col1" id="addressEndKua" style="cursor:pointer">你要去哪儿</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 待处理行程 -->
    <div class="index-box index-waitting">
        <div class="weui-cells">
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <img src="images/daichuli.png" width="20">
                </div>
                <div class="weui-cell__bd">
                    <p>待处理行程</p>
                </div>
            </div>
            <a class="weui-cell weui-cell_access left0" href="等待接单.html">
                <div class="weui-cell__hd">
                    <img src="images/shal.png" width="40" height="40">
                </div>
                <div class="weui-cell__bd">
                    <p>明天 8:30</p>
                    <p class="huic"> 
                        <span>初心法式甜点</span>
                        <img src="images/jiantou.png" width="15" />
                        <span>鹿邑饭店</span>
                    </p>
                </div>
                <div class="weui-cell__ft">等待接单</div>
            </a>
        </div>
    </div>

    <!-- 行程中 -->
    <div class="index-box index-xingchengz">
        <div class="weui-cells">
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <img src="images/xingchengzhong.png" width="20">
                </div>
                <div class="weui-cell__bd">
                    <p>行程中</p>
                </div>
            </div>
            <div class="weui-cell left0">
                <div class="weui-cell__hd">
                    <div class="touxiang">
                        <img class="t-photo" src="images/photo.jpg" width="60" height="60">
                        <img class="t-icon" src="images/sex1.png" width="15">
                    </div>
                </div>
                <div class="weui-cell__bd pos-tel">
                    <p class="f17">仙人掌</p>
                    <p class="xcz-chexing"> 
                        <span class="xinren">信任值80分</span>
                        <span>华泰圣达菲</span>
                    </p>
                    <div class="pos-tel-abs"><a href="tel:13137683557"><img src="images/tel.png" width="30"></a></div>
                </div>
            </div>
            <div class="weui-cell left0">

                <div class="weui-cell__bd xingchengz">
                    
                    <div class="weui-cells">
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <img src="images/wait.png" width="8" class="wait">
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>今天 18:30</span>
                                    <span class="font1">3坐</span>
                                    <span class="font2">95%顺路</span>
                                </p>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <span class="dian"></span>
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>周口一高（西门）</span>
                                    <span class="font1">银珠路 7km</span>
                                </p>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <span class="dian2"></span>
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>项城市中医院</span>
                                    <span class="font1">湖滨路 3.4km</span>
                                </p>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="weui-cell left0">
                
                <div class="weui-cell__bd">
                    <p class="xingchengz-tel">
                        <span class="col1">请耐心等待</span>
                        <!--<a href="tel:13137683557" class="telephone"><img src="images/tel.png" width="20" />联系电话</a>-->
                        <a href="行程中.html" class="telephone" style="padding: 0 16px;">进入行程</a>
                    </p>
                </div>
            </div>
        </div>
    </div>

    <!-- 发现 -->
    <div class="index-box index-waitting index-find">
        <div class="weui-cells">
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <img src="images/faxian.png" width="20">
                </div>
                <div class="weui-cell__bd">
                    <p>发现</p>
                </div>
            </div>
            <a class="weui-cell weui-cell_access left0" href="认证后车主-首页.html">
                <div class="weui-cell__hd">
                    <img src="images/che.png" width="20">
                </div>
                <div class="weui-cell__bd">
                    <p>成为车主</p>
                </div>
                <div class="weui-cell__ft f13">顺路接人平摊油费<span class="yuan"></span></div>
            </a>
            <a class="weui-cell weui-cell_access left0" href="javascript:;">
                <div class="weui-cell__hd">
                    <img src="images/liwu.png" width="20">
                </div>
                <div class="weui-cell__bd">
                    <p>邀请车主</p>
                </div>
                <div class="weui-cell__ft f13">立得20元<span class="yuan"></span></div>
            </a>

            <!--附近车主-->
            <a class="weui-cell weui-cell_access left0" href="javascript:;">
                <div class="weui-cell__hd">
                    <img src="images/fujin.png" width="20">
                </div>
                <div class="weui-cell__bd">
                    <p>附近车主</p>
                </div>
                <div class="weui-cell__ft f13">1人</div>
            </a>
            <div class="NearbyPassengers">
                <a href="市内车主.html">西环路 <span>1人</span></a>
            </div>
            <!--跨城车主-->
            <a class="weui-cell weui-cell_access left0" href="javascript:;">
                <div class="weui-cell__hd">
                    <img src="images/chengshi.png" width="20">
                </div>
                <div class="weui-cell__bd">
                    <p>跨城车主</p>
                </div>
                <div class="weui-cell__ft f13">146人</div>
            </a>
            <div class="NearbyPassengers">
                <a href="跨城车主.html">郑州 <span>85人</span></a>
                <a href="跨城车主.html">商丘 <span>9人</span></a>
                <a href="跨城车主.html">信阳 <span>6人</span></a>
                <a href="跨城车主.html">郑州 <span>85人</span></a>
                <a href="跨城车主.html">商丘 <span>9人</span></a>
                <a href="跨城车主.html">信阳 <span>6人</span></a>
            </div>
        </div>
    </div>

    <!-- 等待接单 -->
    <div class="index-box index-xingchengz" style="display: none">
        <div class="weui-cells">
            <div class="weui-cell">
                <div class="weui-cell__hd">
                    <img src="images/daichuli.png" width="20">
                </div>
                <div class="weui-cell__bd">
                    <p>等待接单</p>
                </div>
            </div>
        </div>
        <!-- 第一个 -->
        <div class="weui-cells">
            <div class="weui-cell left0">
                <div class="weui-cell__hd">
                    <div class="touxiang">
                        <img class="t-photo" src="images/photo.jpg" width="60" height="60">
                        <img class="t-icon" src="images/sex1.png" width="15">
                    </div>
                </div>
                <div class="weui-cell__bd pos-tel">
                    <p class="f17">仙人掌</p>
                    <p class="xcz-chexing"> 
                        <span class="xinren">信任值80分</span>
                        <span>华泰圣达菲</span>
                    </p>
                    <div class="pos-tel-abs"><img src="images/tel.png" width="30"></div>
                </div>
            </div>
            <div class="weui-cell left0">

                <div class="weui-cell__bd xingchengz">
                    
                    <div class="weui-cells">
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <img src="images/wait.png" width="8" class="wait">
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>今天 18:30</span>
                                    <span class="font1">3坐</span>
                                    <span class="font2">95%顺路</span>
                                </p>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <span class="dian"></span>
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>周口一高（西门）</span>
                                    <span class="font1">银珠路 7km</span>
                                </p>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <span class="dian2"></span>
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>项城市中医院</span>
                                    <span class="font1">湖滨路 3.4km</span>
                                </p>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="weui-cell left0">
                
                <div class="weui-cell__bd">
                    <p class="xingchengz-tel">
                        <span class="col1">正在寻找乘客</span>
                        <a href="javascript:;" class="telephone" id="reserve1"><img src="images/yuyue.png" width="20"/>我要预约</a>
                    </p>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 第二个 -->
    <div class="index-box index-xingchengz" style="display: none">
        <div class="weui-cells">
            <div class="weui-cell left0">
                <div class="weui-cell__hd">
                    <div class="touxiang">
                        <img class="t-photo" src="images/photo.jpg" width="60" height="60">
                        <img class="t-icon" src="images/sex2.png" width="15">
                    </div>
                </div>
                <div class="weui-cell__bd pos-tel">
                    <p class="f17">仙人掌</p>
                    <p class="xcz-chexing"> 
                        <span class="xinren">信任值80分</span>
                        <span>华泰圣达菲</span>
                    </p>
                    <div class="pos-tel-abs"><img src="images/tel.png" width="30"></div>
                </div>
            </div>
            <div class="weui-cell left0">

                <div class="weui-cell__bd xingchengz">
                    
                    <div class="weui-cells">
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <img src="images/wait.png" width="8" class="wait">
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>今天 18:30</span>
                                    <span class="font1">3坐</span>
                                    <span class="font2">95%顺路</span>
                                </p>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <span class="dian"></span>
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>周口一高（西门）</span>
                                    <span class="font1">银珠路 7km</span>
                                </p>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <span class="dian2"></span>
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>项城市中医院</span>
                                    <span class="font1">湖滨路 3.4km</span>
                                </p>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="weui-cell left0">
                <div class="weui-cell__bd">
                    <p class="xingchengz-tel">
                        <span class="col1">正在寻找乘客</span>
                        <a href="javascript:;" class="telephone" id="reserve2"><img src="images/yuyue.png" width="20"/>我要预约</a>
                    </p>
                </div>
            </div>
        </div>
    </div>


    <div style="margin: 5px;">
        <img src="images/guanggao.jpg" style="width:100%">
    </div>

    <!--市内-你从哪儿出发-->
    <div id="addressStartAll" class="weui-popup__container popup-address">
        <div class="weui-popup__overlay"></div>
        <div class="weui-popup__modal">
            <div class="popup-address-search">
                <div class="address" id="cityAddress">
                    <span>周口</span>
                    <img src="images/xia.png" width="20">
                </div>
                <input type="text" id="addressText1" placeholder="你从哪儿出发" name="addressText" onfocus='this.value=""'>
                <a href="javascript:;" class="close-popup" id="aaa">取消</a>
            </div>
        </div>
    </div>
    <div class="pos-city-box index-box" id="posCityBox" style="display: none;">
        <a href="javascirpt:;">周口</a>
        <a href="javascirpt:;">郑州</a>
        <a href="javascirpt:;">信阳</a>
        <a href="javascirpt:;">安阳</a>
        <a href="javascirpt:;">三门峡</a>
        <a href="javascirpt:;">安阳</a>
        <a href="javascirpt:;">鹤壁</a>
        <a href="javascirpt:;">平顶山</a>
    </div>
    <!--市内-你要去哪儿-->
    <div id="addressStartAll2" class="weui-popup__container popup-address">
        <div class="weui-popup__overlay"></div>
        <div class="weui-popup__modal">
            <div class="popup-address-search">
                <div class="address">
                    <span>周口</span>
                    <img src="images/xia.png" width="20">
                </div>
                <input type="text" id="addressText2" placeholder="你要去哪儿" name="addressText" onfocus='this.value=""'>
                <a href="javascript:;" class="close-popup" id="aaa2">取消</a>
            </div>
        </div>
    </div>
    <!--跨市-你从哪儿出发-->
    <div id="addressStartAll3" class="weui-popup__container popup-address">
        <div class="weui-popup__overlay"></div>
        <div class="weui-popup__modal">
            <div class="popup-address-search">
                <div class="address">
                    <span>周口</span>
                    <img src="images/xia.png" width="20">
                </div>
                <input type="text" id="addressText3" placeholder="你从哪儿出发" name="addressText" onfocus='this.value=""'>
                <a href="javascript:;" class="close-popup" id="aaa3">取消</a>
            </div>
        </div>
    </div>
    <!--跨市-你要去哪儿-->
    <div id="addressStartAll4" class="weui-popup__container popup-address">
        <div class="weui-popup__overlay"></div>
        <div class="weui-popup__modal">
            <div class="popup-address-search">
                <div class="address">
                    <span>周口</span>
                    <img src="images/xia.png" width="20">
                </div>
                <input type="text" id="addressText4" placeholder="你要去哪儿" name="addressText" onfocus='this.value=""'>
                <a href="javascript:;" class="close-popup" id="aaa4">取消</a>
            </div>
        </div>
    </div>

    <div class="demos-content-padded">
        <div class="weui-footer">
            <p class="weui-footer__text">技术支持-机智物联</p>
        </div>
    </div>
    <div class="share-box" id="share_box">
        <div class="share-pop"></div>
        <div class="share-pop-div">
            <div style="text-align: right;margin-top: 20px;"><img src="images/jiantou3.png" width="200"></div>
            <p class="p1">点击右上角分享给好友<br/>邀请他成为车主</p>
        </div>
    </div>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-weui.min.js"></script>
<script src="js/store.js"></script>
    <style>
        .demos-content-padded{padding:15px}
        .amap-sug-result{width:94%;left: 3%!important;border:0;background:#fff;border-radius: 2px;box-shadow:0px 0px  10px 3px #e7e7e7;top:46px;}
        .auto-item-span{display:block;padding-left:0;font-size: 13px;color:#939393;}
        .auto-item{background: url("images/wait.png") no-repeat left 7% center;background-size: auto 17%;padding-left:12%;font-size: 15px;line-height: 24px;border-bottom: 1px solid #e5e5e5;}
    </style>
    <script>
        $("#share_pop").on("click",function () {
            $("#share_box").show();
        });
        $("#share_box").on("click",function () {
            $("#share_box").hide();
        });
        // 切换城市
        $(document).on("click", "#cityAddress", function() {
            $("#posCityBox").show();
        });
        var autoOptions;
        $.each($("#posCityBox a"), function (k,v) {
            $(v).click(function () {
                console.log($(this).text());
                $("#cityAddress span").text($(this).text());
                $("#posCityBox").hide();
                autoOptions = {
                    city: $("#cityAddress span").text(), 								// 城市，默认全国
                    input: "addressText1"						// 使用联想输入的input的id
                };
                cityChoice(autoOptions);
                console.table(autoOptions)
            });
        });

        // 提示认证
        // $.confirm("您需要完成基础认证才可以发布行程", "温馨提示", function() {
        //     //确定操作
        //     location.href = "实名认证.html"
        // }, function() {
        //     //取消操作
        // });

        $(document).on("click", "#reserve1,#reserve2", function() {
            $.confirm("您确定要预约吗?", "确认预约?", function() {
                //确定操作
                $.toast("已预约!");
            }, function() {
                //取消操作
            });
        });

        // 选择地址
        var beginPlace, beginDetail, endPlace, endDetail, lonlatBegin, lonlatEnd;
        // var windowsArr = [];
        // var marker = [];
        var map = new AMap.Map("mapContainer", {
            resizeEnable: true,
            center: [114.689762, 33.641854],		// 地图中心点
            zoom: 13,								// 地图显示的缩放级别
            keyboardEnable: false
        });

        cityChoice(autoOptions);

        function cityChoice(autoOptions){
            AMap.plugin(['AMap.Autocomplete','AMap.PlaceSearch'],function() {
                var placeSearch = new AMap.PlaceSearch({
                    city: '周口',
                    map: map
                })
                // 你从哪儿出发-本市
                if(autoOptions == undefined){
                    autoOptions = {
                        city: '周口', 								// 城市，默认全国
                        input: "addressText1"						// 使用联想输入的input的id
                    };
                }
                console.table(autoOptions)
                autocomplete = new AMap.Autocomplete(autoOptions);
                AMap.event.addListener(autocomplete, "select", function (e) {
                    // TODO 针对选中的poi实现自己的功能
                    placeSearch.setCity(e.poi.adcode);
                    placeSearch.search(e.poi.name);
                    console.log(e);
                    $.closePopup("#addressStartAll");
                    $("#addressStart").text(e.poi.name);
                    $("#addressStart").attr("vname", e.poi.name);
                    $("#addressStart").attr("vlng", e.poi.location.lng);//经度
                    $("#addressStart").attr("vlat", e.poi.location.lat);//纬度
                });
            });
        }
        AMap.plugin(['AMap.Autocomplete','AMap.PlaceSearch'],function(){
            var placeSearch = new AMap.PlaceSearch({
                city:'周口',
                map:map
            })
            // 你从哪儿出发-本市
            // var autoOptions = {
            //     city: '周口', 								// 城市，默认全国
            //     input: "addressText1"						// 使用联想输入的input的id
            // };
            // console.table(autoOptions)
            // autocomplete= new AMap.Autocomplete(autoOptions);
            // AMap.event.addListener(autocomplete, "select", function(e){
            //     // TODO 针对选中的poi实现自己的功能
            //     placeSearch.setCity(e.poi.adcode);
            //     placeSearch.search(e.poi.name);
            //     console.log(e);
            //     $.closePopup("#addressStartAll");
            //     $("#addressStart").text(e.poi.name);
            //     $("#addressStart").attr("vname", e.poi.name);
            //     $("#addressStart").attr("vlng", e.poi.location.lng);//经度
            //     $("#addressStart").attr("vlat", e.poi.location.lat);//纬度
            // });

            // 你从哪儿出发-跨市
            var autoOptions3 = {
                city: "周口", 								// 城市，默认全国
                input: "addressText3"						// 使用联想输入的input的id
            };
            autocomplete= new AMap.Autocomplete(autoOptions3);
            AMap.event.addListener(autocomplete, "select", function(e){
                // TODO 针对选中的poi实现自己的功能
                placeSearch.setCity(e.poi.adcode);
                placeSearch.search(e.poi.name)
                console.log(e);
                $.closePopup("#addressStartAll3");
                $("#addressStartKua").text(e.poi.name);
                $("#addressStartKua").attr("vname", e.poi.name);
                $("#addressStartKua").attr("vlng", e.poi.location.lng);//经度
                $("#addressStartKua").attr("vlat", e.poi.location.lat);//纬度
            });

            // 你要去哪儿-本市
            var autoOptions2 = {
                city: "周口", 								// 城市，默认全国
                input: "addressText2"						// 使用联想输入的input的id
            };
            autocomplete= new AMap.Autocomplete(autoOptions2);
            AMap.event.addListener(autocomplete, "select", function(e){
                $.closePopup("#addressStartAll2");
                $("#addressEnd").text(e.poi.name);
                $("#addressEnd").attr("vname", e.poi.name);
                $("#addressEnd").attr("vlng", e.poi.location.lng);//经度
                $("#addressEnd").attr("vlat", e.poi.location.lat);//纬度
                beginPlace = "周口",
                beginDetail = $("#addressStart").attr("vname"),
                endPlace = "周口",
                endDetail = $("#addressEnd").attr("vname"),
                lonlatBegin = {
                    lng: $("#addressStart").attr("vlng"),
                    lat: $("#addressStart").attr("vlat")
                },
                lonlatEnd = {
                    lng: $("#addressEnd").attr("vlng"),
                    lat: $("#addressEnd").attr("vlat")
                };
                var dataStore = {
                    type: "1",// 1乘客 2载客
                    region: "2",// 0本市 1跨市
                    begin_place: beginPlace,// 起点位置
                    begin_detail: beginDetail,// 起点位置详细地址
                    end_place: endPlace,// 终点位置
                    end_detail: endDetail,// 终点位置详细地址
                    lonlat_begin: lonlatBegin,// 起点经纬度
                    lonlat_end: lonlatEnd,// 终点经纬度
                }
                store.set("dataStore", dataStore);
                console.log(store.get('dataStore'));
                location.href = "确认发布.html";
            });

            // 你要去哪儿-跨市
            var autoOptions4 = {
                city: "周口", 								// 城市，默认全国
                input: "addressText4"						// 使用联想输入的input的id
            };
            autocomplete= new AMap.Autocomplete(autoOptions4);
            AMap.event.addListener(autocomplete, "select", function(e){
                $.closePopup("#addressStartAll4");
                // if($("#navbarShi .weui-bar__item--on").attr("vid") == 0){
                $("#addressEndKua").text(e.poi.name);
                $("#addressEndKua").attr("vname", e.poi.name);
                $("#addressEndKua").attr("vlng", e.poi.location.lng);//经度
                $("#addressEndKua").attr("vlat", e.poi.location.lat);//纬度
                beginPlace = "周口",
                beginDetail = $("#addressStartKua").attr("vname"),
                endPlace = "周口",
                endDetail = $("#addressEndKua").attr("vname"),
                lonlatBegin = {
                    lng: $("#addressStartKua").attr("vlng"),
                    lat: $("#addressStartKua").attr("vlat")
                },
                lonlatEnd = {
                    lng: $("#addressEndKua").attr("vlng"),
                    lat: $("#addressEndKua").attr("vlat")
                };
                var dataStore = {
                    type: "1",// 1乘客 2载客
                    region: "2",// 0本市 1跨市
                    begin_place: beginPlace,// 起点位置
                    begin_detail: beginDetail,// 起点位置详细地址
                    end_place: endPlace,// 终点位置
                    end_detail: endDetail,// 终点位置详细地址
                    lonlat_begin: lonlatBegin,// 起点经纬度
                    lonlat_end: lonlatEnd,// 终点经纬度
                }
                store.set("dataStore", dataStore);
                console.log(store.get('dataStore'));
                location.href = "确认发布.html";
            });
        });
        // store.remove('dataStore'); //清楚缓存

        // 本市
        $(document).on("click", "#addressStart", function() {
            $("#addressStartAll").popup();
        });
        $(document).on("click", "#aaa", function() {
            $.closePopup("#addressStartAll");
        });
        $(document).on("click", "#addressEnd", function() {
            if($("#addressStart").attr("vname") == undefined){
                $.toast("先选择起点", "text");
            }else{
                $("#addressStartAll2").popup();
            }
        });
        // 跨市
        $(document).on("click", "#addressStartKua", function() {
            $("#addressStartAll3").popup();
        });
        $(document).on("click", "#aaa3", function() {
            $.closePopup("#addressStartAll3");
        });
        $(document).on("click", "#aaa2", function() {
            $.closePopup("#addressStartAll2");
        });
        $(document).on("click", "#addressEndKua", function() {
            if($("#addressStartKua").attr("vname") == undefined){
                $.toast("先选择起点", "text");
            }else{
                $("#addressStartAll4").popup();
            }
        });
        $(document).on("click", "#aaa4", function() {
            $.closePopup("#addressStartAll4");
        });


        // 跳转
        // $("#addressStartAll2").find(".weui-cell").click(function () {
        //     location.href = "确认发布.html";
        // });

    </script>
    <script type="text/javascript" src="https://webapi.amap.com/demos/js/liteToolbar.js"></script>
</body>
</html>

